﻿using System;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MyHelperDebug.HelpUnitTesting;
using System.Collections;

namespace TestMyHelper {
	[TestClass]
	public class TestEquvivalent : FlowAsserts {
		[TestMethod]
		public void Should_show_surplus() {
			Equivalent(new[] {1, 2, 3}, new[] {1, 2, 3, 4, 5});
		}

		[TestMethod]
		public void Should_show_missings() {
			Equivalent(new[] { 1, 2, 3 }, new[] { 3 });
		}

		[TestMethod]
		public void Should_surlus_and_missings_when_count_equals() {
			Equivalent(new[] { 1, 2, 3 }, new[] { 1, 4, 5 });
		}

		[TestMethod]
		public void Should_show_type_of_objects_for_generic_collection() {
			Equivalent(new[] { 1, 2, 3 }.ToList(), new[] { 1, 4, 5 }.ToList());
		}

		[TestMethod]
		public void Should_show_type_of_objects_for_untyped_collections() {
			Equivalent(new object[] { 1, 2, 3 }, new object[] { 1, 4, 5 });
		}
	}
}
